package org.codert.codertadmin.advice;

import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * @author: TanJingyu
 * @create: 2021-08-10 11:48
 **/
@RestControllerAdvice
public class ExceptionControllerAdvice{

    @ExceptionHandler(Exception.class)
    public Object advice(Exception e) {
        return e.getMessage();
    }
}
